{include file="header"}
<div class="x-body">
    <!--条件删选-->
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so layui-form-pane">
            <input class="layui-input" placeholder="搜索" value="{:get('ks','')}" name="ks">
            <button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="iconfont">&#xe6ac;</i>搜索</button>
        </form>
    </div>
<div class="layui-tab layui-tab-brief">
  <ul class="layui-tab-title">
    <li {if input('open')==1}class="layui-this"{/if}><a href="{:url('admin/content/index',array('open'=>1))}">
    正常[{:fun_st('html',array('open'=>1))}]</a></li>
    <li {if get('open')==0}class="layui-this"{/if}><a href="{:url('admin/content/index',array('open'=>0))}">隐藏[{:fun_st('html',array('open'=>0))}]</a></li>
    <li {if get('or')=='settop'}class="layui-this"{/if}><a href="{:url('admin/content/index',array('or'=>'settop'))}">置顶[{:fun_st('html',array('settop'=>1))}]</a></li>
    <li {if get('or')=='huandeng'}class="layui-this"{/if}><a href="{:url('admin/content/index',array('or'=>'huandeng'))}">幻灯[{:fun_st('html',array('huandeng'=>1))}]</a></li>
  </ul>
</div>  
    <form class="layui-form">
        <input type="hidden" name="model" value="html">
        <xblock>
            <button class="layui-btn layui-btn-danger" lay-submit lay-filter="delete"><i class="layui-icon"></i>批量删除</button>  <a class="layui-btn" onclick="x_admin_show('添加','{:url('admin/content/add')}')"><i class="layui-icon"></i>添加</a>
            <span class="x-right" style="line-height:40px">共有数据：{:fun_st('html',array())} 条</span>
        </xblock>
        <div  style="overflow: auto;">
        <table class="layui-table" style="min-width: 1000px;">
            <colgroup>
                <col width="100">
                    <col width="100">
                        <col>
            </colgroup>
            <thead>
                <tr>
                    <th>
                        <input type="checkbox" name="checkAll" lay-filter="checkAll" title="全选">
                    </th>
                    <th>ID</th>
                    <th>分类</th>
                    <th>标题</th>
                    <th>作者</th>
                    <th>状态</th>
                    <th>时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {volist name=":fun_so('html',array(get('or','open')=>get('open')),get('ks',''))" id="vo" empty="
                <div align='center'>
                    <img src='/public/img/empty.jpg' height='200' />
                    <h4 class='pt-20'>
                       空空如也..
                       </h4>
                </div>"}
                <!--内容-->
                <tr>
                    <td>
                        <input type="checkbox" name="ids[{$vo.id}]" lay-filter="checkOne" value="{$vo.id}" title="选择">
                    </td>
                    <td>{$vo.id}</td>
                    <td><a href="{:url('index/index/cate',array('alias'=>fun_cate($vo.tid,'alias')))}" target="_blank">{:fun_cate($vo.tid,'name')}</a>
                    </td>
                    <td>
                        <a href="{:url('index/index/html',array('id'=>$vo.id))}" target="_blank">{$vo.title}</a>
                        <input type="checkbox" lay-skin="switch" url="{:url('admin/api/uindex')}?id={$vo.id}&model=html&or=open" lay-submit lay-filter="index" value="{$vo.id}" lay-text="显示|显示"  {if condition="$vo['open'] eq 1"}checked{/if}>
                    </td>
                    <td>   {:fun_u($vo.uid, 'username')} 
                    </td>
                    <td> 
                      [
                      {if $vo.open==1}<font color="#0dc316">正常</font>{/if}
                      {if $vo.open==0}<font color="#1e9fff">待审核</font>{/if}
                      {if $vo.open==-1}<font color="#fd5f56">不通过</font>{/if}
                      ]
                      {if $vo.settop==1}[<font color="#0dc316">置顶</font>]{/if}
                      {if $vo.jing==1}[<font color="#0dc316">精选</font>]{/if}
                    </td>
                    <td>{$vo.time|times}</td>
                    <td class="td-manage"> <a class="layui-btn layui-btn-sm" onclick="x_admin_show('编审','{:url('admin/content/add',array('m'=>input('m'),'wz'=>input('wz')))}?id={$vo.id}')"><i class="layui-icon"></i>编审</a>
                        <a class="layui-btn layui-btn-sm layui-btn-danger del_t" url="{:url('admin/api/catedelete')}?model=html&id={$vo.id}" name="确定要删除这条记录吗？"><i class="layui-icon"></i>删除</a>
                    </td>
                </tr>
                {/volist}
            </tbody>
        </table>
        </div>
    </form>
    <div class="page">{:fun_so('html',array(get('or','open')=>get('open')),get('ks',''))->render()}</div>
</div>{include file="footer"}